package org.example.core.constant;

import io.jsonwebtoken.security.Keys;

import javax.crypto.SecretKey;

/**
 * @author 小杰_cc
 * @version 1.0
 */
public class TokenConstants {
    // 令牌密钥
    public static final SecretKey USER_SECRET = Keys.hmacShaKeyFor("hdi3HgsK76uf23afFAEFUIttPOnyeu92bjhkshKgIgHKGhfFw24gkdj9kfKLHfghAF97fLKHND3ef3AF752FLHt3sgSD9kfdshfs".getBytes());

    // 会员令牌密钥
    public static final SecretKey MEMBER_SECRET = Keys.hmacShaKeyFor("hdi3HgsK76uASKFU3423IttPOnyeu92bjhkshKIgH297fFw4gkdj9kfKLHghAF97fLKHgD3ef3AF752LHt3gfSD9kfdsh6kDFJ".getBytes());

    // 令牌标识
    public static final String AUTHENTICATION = "Authorization";

    // 令牌前缀
    public static final String PREFIX = "Bearer ";

    // 用户id
    public static final String USER_ID = "user_id";

    // 用户名
    public static final String USER_NAME = "username";

    // 会员id
    public static final String MEMBER_ID = "member_id";

    // 会员名
    public static final String MEMBER_NAME = "membername";

    // 超级管理员标识
    public static final String SUPER_ADMIN = "admin";

    // 所有权限标识
    public static final String ALL_PERMISSION = "*:*:*";

    // 会员token过期时间
    public static final long EXPIRATION = 45;

    // token刷新时间
    public static final long REFRESH_TIME = 15;

    // 会员token过期时间
    public static final long MEMBER_EXPIRATION = 7;

    // 刷新请求头
    public static final String REFRESH_MARK = "X-Refresh";
}